import request from '@/utils/request'

const commonApi = {
  updatePassword: '/api/sysusers/postUpdatePassword',
  dropdownSelect: '/api/sysobject/getDropList',
  parameter: '/api/sys_parameter/getSys_ParameterList',
  parameterInfo: '/api/sys_parameter/getSys_ParameterByID',
  queryParameter: '/api/sys_parameter/judgePmKeyName',
  setParameter: '/api/sys_parameter/Post_SYS_Parameter',
  dropdown: '/api/sysobject/getsysParameterDropList',
  sms: '/api/sysobject/SendYZM',
  querySms: '/api/sysobject/JudgeYZM',
  tressSync: '/api/sysobject/getTreeDropListCat',
  treeSelectAll: '/api/sysobject/getTreeDropListCat',
  treeSelectEnable: '/api/sysobject/getTreeDropListCatEnable',
  treeSelectParent: '/api/sysobject/getTreeTrunkByChildID',
  dropdownCondition: '/api/sysobject/getDropListCondition',
  postSms: '/api/jy_zjgl/post_QZCJ_FSDX',
  log: '/api/sysobject/getZCGL_SYSLog',
  logInfo: '/api/sysobject/getZCGL_SYSDetailLog',
  assetOverview: '/api/statistics/Get_FX_ZCGK',
  assetOverviewTotal: '/api/statistics/Get_FX_DNSRHJ',
  houseProportion: '/api/statistics/Get_FX_FWZCSL',
  summary: '/api/statistics/Get_SY_TJTB',
  summaryList: '/api/statistics/Get_FX_ZJXXXX',
  execution: '/api/statistics/Get_FX_ZBWCQK',
  area: '/api/statistics/Get_FX_HTFWZLL',
  parameterSelect: '/api/csgl/getCsglList'
}

export function updatePassword (parameter) {
  return request({
    url: commonApi.updatePassword,
    method: 'post',
    data: parameter
  })
}

export function getSyncTreeList (parameter) {
  return request({
    url: commonApi.tressSync,
    method: 'get',
    params: parameter
  })
}

export function getDropdownSelectList (parameter) {
  return request({
    url: commonApi.dropdownSelect,
    method: 'get',
    params: parameter
  })
}

export function getParameterList (parameter) {
  return request({
    url: commonApi.parameter,
    method: 'get',
    params: parameter
  })
}

export function getParameterInfo (parameter) {
  return request({
    url: commonApi.parameterInfo,
    method: 'get',
    params: parameter
  })
}

export function queryParameterName (parameter) {
  return request({
    url: commonApi.queryParameter,
    method: 'get',
    params: parameter
  })
}

export function setParameters (parameter) {
  return request({
    url: commonApi.setParameter,
    method: 'post',
    data: parameter
  })
}

export function getDropdownList (parameter) {
  return request({
    url: commonApi.dropdown,
    method: 'get',
    params: parameter
  })
}

export function sendSmsCode (parameter) {
  return request({
    url: commonApi.sms,
    method: 'get',
    params: parameter
  })
}

export function querySmsCode (parameter) {
  return request({
    url: commonApi.querySms,
    method: 'get',
    params: parameter
  })
}

export function getTreeAll (parameter) {
  return request({
    url: commonApi.treeSelectAll,
    method: 'get',
    params: parameter
  })
}

export function getTreeEnable (parameter) {
  return request({
    url: commonApi.treeSelectEnable,
    method: 'get',
    params: parameter
  })
}

export function getTreeSelectParentName (parameter) {
  return request({
    url: commonApi.treeSelectParent,
    method: 'get',
    params: parameter
  })
}

export function getDropdownConditionList (parameter) {
  return request({
    url: commonApi.dropdownCondition,
    method: 'get',
    params: parameter
  })
}

export function postSMS (parameter) {
  return request({
    url: commonApi.postSms,
    method: 'post',
    data: parameter
  })
}

export function getLogList (parameter) {
  return request({
    url: commonApi.log,
    method: 'get',
    params: parameter
  })
}

export function getLogInfo (parameter) {
  return request({
    url: commonApi.logInfo,
    method: 'get',
    params: parameter
  })
}

export function getAssetOverview (parameter) {
  return request({
    url: commonApi.assetOverview,
    method: 'get',
    params: parameter
  })
}

export function getAssetOverviewTotal (parameter) {
  return request({
    url: commonApi.assetOverviewTotal,
    method: 'get',
    params: parameter
  })
}

export function getHouseProportion (parameter) {
  return request({
    url: commonApi.houseProportion,
    method: 'get',
    params: parameter
  })
}

export function getSummary (parameter) {
  return request({
    url: commonApi.summary,
    method: 'get',
    params: parameter
  })
}

export function getSummaryList (parameter) {
  return request({
    url: commonApi.summaryList,
    method: 'get',
    params: parameter
  })
}

export function getExecution (parameter) {
  return request({
    url: commonApi.execution,
    method: 'get',
    params: parameter
  })
}

export function getArea (parameter) {
  return request({
    url: commonApi.area,
    method: 'get',
    params: parameter
  })
}

export function getParameterSelect (parameter) {
  return request({
    url: commonApi.parameterSelect,
    method: 'get',
    params: parameter
  })
}
